Skip to main content

All Questions

0votes
1answer
4kviews

ValueError: Found unknown categories ['IR', 'HN', 'MT', 'PH', 'NZ', 'CZ', 'MD'] in column 3 during transform

I am trying to use Linear Regression, to predict salary in USD. I have the following data: Data: 607 records Numerical columns: year, salary, salary in USD Categorical columns: experience, type, ...
Alix Blaine's user avatar
1vote
0answers
336views

Multi Linear Regression on String Values

I'm using datasets which involves mostly of string values. The main outcome of the project is that it should predict success. Now I can use OneHotEncoding to convert string values in numerical format ...
Abdul Munim's user avatar
0votes
1answer
220views

scikit-learn: feature analysis differs heavily from model coefficients

I am trying to perform linear regression and I want to analyse the available features beforehand. The task is to predict the value of a house. Some of them might have a high impact on the label, ...
hecad57571's user avatar
0votes
1answer
517views

unable to predict by LinearRegression

Should I add csv as text in SO question? There's lot more data. ...
user avatar
1vote
1answer
456views

TicTacToe Linear Regression low accuracy and R^2 score

Im using the python sklearn library to attempt a linear regression TicTacToe AI. I create my training set by simply having the computer play random 'blind' games against itself. For example... Player ...
efel's user avatar
  • 113
9votes
2answers
7kviews

How to normalize data without knowing the min and max values?

I have a Lending club dataset from Kaggle; it contains many different columns: there are for example dummy variables, years, amount of the loan...ect I want to normalize the data in the training and ...
Ghassen Ben Hamida's user avatar
1vote
0answers
121views

How increase forecast accuracy in sklearn linear regression [closed]

I have this code - ...
DiamondKesha's user avatar
1vote
1answer
126views

How to use a a trained model

I just trained my first model in Python 3.7/scikitlearn (Linear Regression) (well I copied most of the code but its something ^^). Now I want to actually Use the model. Specifically its about sons ...
G.M's user avatar
  • 181
0votes
2answers
369views

Changing categorical data to binary data is not reflected on the dataset

I am working through the Titanic competition. This is my code so far: ...
Andros Adrianopolos's user avatar
1vote
0answers
99views

Linear regression load model doesn't predict as expected

I have trained a linear regression model, with sklearn, for a 5 star rating and it's good enough. I have used Doc2vec to create my vectors, and saved that model. Then I save the linear regression ...
Marilou's user avatar
1vote
2answers
109views

How do I correctly build model on given data to predict target parameter?

I have some dataset which contains different paramteres and data.head() looks like this Applied some preprocessing and performed Feature ranking - ...
Jhon Patric's user avatar
3votes
1answer
6kviews

model.score and r2_score giving different values for a regression model

I am build a linear regression model and a decision tree model using sklearn. I want to compare the performance of these two models, I have calculated the r2_score for both the models. I have ...
chink's user avatar
1vote
1answer
7kviews

Getting negative r2_score with new set of dimensions

I am trying to predict flight take off delay using my current dataset. At this point of time, I only have four dimensions. ...
Pramod's user avatar
32votes
3answers
147kviews

How can I check the correlation between features and target variable?

I am trying to build a Regression model and I am looking for a way to check whether there's any correlation between features and target variables? This is my ...
Anjith's user avatar
1vote
1answer
1kviews

Why is ElasticNet performs worse than both Lasso and Ridge?

I am using the following codes to build a few models on the same dataset: ...
Edamame's user avatar
  • 2,775

153050per page
close